import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        int price = console.nextInt();
        int cost = 0;

        //write your code here......
       cost = price<100?price:price<500?(int)(price*0.9):price<2000?(int)(price*0.8):price<5000?(int)(price*0.7):(int)(price*0.6);
        System.out.println(cost);
    }
}